package com.example.ivos.vehicle.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class VehicleParam {
    @ApiModelProperty(value = "车辆id",required = true)
    private Long id;
    @ApiModelProperty(value = "车辆品牌",required = true)
    private String brand;
    @ApiModelProperty(value = "车牌号",required = true)
    private String license;
    @ApiModelProperty(value = "车辆型号",required = true)
    private String model;
    @ApiModelProperty(value = "车辆识别码",required = true)
    private String code;
    @ApiModelProperty(value = "车辆排量",required = true)
    private String displacement;
    @ApiModelProperty(value = "车辆状态：空闲1 占用2",required = true)
    private String status;
    @ApiModelProperty(value = "车辆类型",required = true)
    private String type;
    @ApiModelProperty(value = "车辆颜色",required = true)
    private String color;
    @ApiModelProperty(value = "里程数",required = true)
    private String kilometers;
    @ApiModelProperty(value = "上牌时间",required = true)
    //前端传过来的值是2020-1-1字符串类型，需要使用注解转为Date类型
    //否则会出现400 类型不匹配异常
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date regTime;
    @ApiModelProperty(value = "购买时间",required = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date buyTime;
    @ApiModelProperty(value = "购买价格",required = true)
    private String price;
    @ApiModelProperty(value = "电池类型",required = true)
    private String batteryType;
    @ApiModelProperty(value = "电子围栏绑定状态 已绑定1 未绑定0",required = true)
    private String geofenceBindStatus;
    @ApiModelProperty(value = "电子围栏id",required = true)
    private Long geofenceId;
}
